define(function (require, exports, module) {

    var sTpl = require("modules/cube-api-list/index.html");

    var vueComponent = Vue.extend({
        template: sTpl,
        props: {
            hasOpt: {
                default: false //一般都用于查看
            },
            curCubeId: {
                default: ''
            }
        },
        data: function () {
            return {
                tableData: []
            }
        },
        methods: {
            cellClick: function (row, column, cell, event) {
                alert(row + ' ' + column);
            },
            handleEditClick: function (row, type) {
                var config = {
                    url: '08-apiInfo.html?api_id=' + row.api_id,
                    menuName: row.cnName
                };
                this.openWin(config);
            }
        },
        created: function () {
            // this.curCubeId = parseInt(this.$route.params.curCubeId) || 0;
            var map = require("config/api.js");


           

            if (this.curCubeId == undefined || this.curCubeId == "") {

                this.tableData = map.cube_api;
            } else {

                this.tableData = map.get_cube_api(this.curCubeId);
            }

        }
    });


    Vue.component('m-cube-api-list', vueComponent); //都全局注册 同时exports

    module.exports = vueComponent;
});